<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BadgerDB: badgerdb::BufMgr Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BadgerDB
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacebadgerdb.html">badgerdb</a></li><li class="navelem"><a class="el" href="classbadgerdb_1_1_buf_mgr.html">BufMgr</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classbadgerdb_1_1_buf_mgr-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">badgerdb::BufMgr Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The central class which manages the buffer pool including frame allocation and deallocation to pages in the file.  
 <a href="classbadgerdb_1_1_buf_mgr.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="buffer_8h_source.html">buffer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a18b7cf23b619c7c0e593d1dc45da77b4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#a18b7cf23b619c7c0e593d1dc45da77b4">BufMgr</a> (std::uint32_t bufs)</td></tr>
<tr class="separator:a18b7cf23b619c7c0e593d1dc45da77b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab08001e1be18bfbd4af9113e91cf953"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#aab08001e1be18bfbd4af9113e91cf953">~BufMgr</a> ()</td></tr>
<tr class="separator:aab08001e1be18bfbd4af9113e91cf953"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f853f0f1d4628e7e14374d0c7c6a4f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#a9f853f0f1d4628e7e14374d0c7c6a4f3">readPage</a> (<a class="el" href="classbadgerdb_1_1_file.html">File</a> *file, const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> PageNo, <a class="el" href="classbadgerdb_1_1_page.html">Page</a> *&amp;page)</td></tr>
<tr class="separator:a9f853f0f1d4628e7e14374d0c7c6a4f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9bdf04c8543f59744db22efa9420c89"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#aa9bdf04c8543f59744db22efa9420c89">unPinPage</a> (<a class="el" href="classbadgerdb_1_1_file.html">File</a> *file, const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> PageNo, const bool dirty)</td></tr>
<tr class="separator:aa9bdf04c8543f59744db22efa9420c89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9ae3b12aac55b119b5763e3de2a4d2b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#ab9ae3b12aac55b119b5763e3de2a4d2b">allocPage</a> (<a class="el" href="classbadgerdb_1_1_file.html">File</a> *file, <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> &amp;PageNo, <a class="el" href="classbadgerdb_1_1_page.html">Page</a> *&amp;page)</td></tr>
<tr class="separator:ab9ae3b12aac55b119b5763e3de2a4d2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc61d1985720411ebb76e70f702827d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#acc61d1985720411ebb76e70f702827d3">flushFile</a> (const <a class="el" href="classbadgerdb_1_1_file.html">File</a> *file)</td></tr>
<tr class="separator:acc61d1985720411ebb76e70f702827d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a870a80a0f0abcf3b640b913b46b64486"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#a870a80a0f0abcf3b640b913b46b64486">disposePage</a> (<a class="el" href="classbadgerdb_1_1_file.html">File</a> *file, const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> PageNo)</td></tr>
<tr class="separator:a870a80a0f0abcf3b640b913b46b64486"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a598b3112b8193af603f5bc97c478a671"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#a598b3112b8193af603f5bc97c478a671">printSelf</a> ()</td></tr>
<tr class="separator:a598b3112b8193af603f5bc97c478a671"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93148e1af99f06f4f264d948920b7c1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structbadgerdb_1_1_buf_stats.html">BufStats</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#a93148e1af99f06f4f264d948920b7c1c">getBufStats</a> ()</td></tr>
<tr class="separator:a93148e1af99f06f4f264d948920b7c1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a702a264ae946b334414e51700edd81a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#a702a264ae946b334414e51700edd81a0">clearBufStats</a> ()</td></tr>
<tr class="separator:a702a264ae946b334414e51700edd81a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa498047fc351652d0bc7eabf6cb62ab0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbadgerdb_1_1_page.html">Page</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a></td></tr>
<tr class="separator:aa498047fc351652d0bc7eabf6cb62ab0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The central class which manages the buffer pool including frame allocation and deallocation to pages in the file. </p>

<p class="definition">Definition at line <a class="el" href="buffer_8h_source.html#l00160">160</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a18b7cf23b619c7c0e593d1dc45da77b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18b7cf23b619c7c0e593d1dc45da77b4">&#9670;&nbsp;</a></span>BufMgr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">badgerdb::BufMgr::BufMgr </td>
          <td>(</td>
          <td class="paramtype">std::uint32_t&#160;</td>
          <td class="paramname"><em>bufs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor of <a class="el" href="classbadgerdb_1_1_buf_mgr.html" title="The central class which manages the buffer pool including frame allocation and deallocation to pages ...">BufMgr</a> class </p>

<p class="definition">Definition at line <a class="el" href="buffer_8cpp_source.html#l00020">20</a> of file <a class="el" href="buffer_8cpp_source.html">buffer.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    : numBufs(bufs)</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  {</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    bufDescTable = <span class="keyword">new</span> BufDesc[bufs];</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keywordflow">for</span> (<a class="code" href="namespacebadgerdb.html#a1e7378fbefaea050a47e6cde929e9c01">FrameId</a> i = 0; i &lt; bufs; i++)</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    {</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;      bufDescTable[i].frameNo = i;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;      bufDescTable[i].valid = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    }</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a> = <span class="keyword">new</span> Page[bufs];</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordtype">int</span> htsize = ((((int)(bufs * 1.2)) * 2) / 2) + 1;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    hashTable = <span class="keyword">new</span> BufHashTbl(htsize); <span class="comment">// allocate the buffer hash table</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    clockHand = bufs - 1;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="aab08001e1be18bfbd4af9113e91cf953"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab08001e1be18bfbd4af9113e91cf953">&#9670;&nbsp;</a></span>~BufMgr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">badgerdb::BufMgr::~BufMgr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destructor of <a class="el" href="classbadgerdb_1_1_buf_mgr.html" title="The central class which manages the buffer pool including frame allocation and deallocation to pages ...">BufMgr</a> class </p>

<p class="definition">Definition at line <a class="el" href="buffer_8cpp_source.html#l00039">39</a> of file <a class="el" href="buffer_8cpp_source.html">buffer.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  {</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    BufDesc *tmpbuf;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordflow">for</span> (std::uint32_t i = 0; i &lt; numBufs; i++)</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    {</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;      tmpbuf = &amp;(bufDescTable[i]);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;      <span class="keywordflow">if</span> (tmpbuf-&gt;dirty)</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        tmpbuf-&gt;file-&gt;writePage(<a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a>[tmpbuf-&gt;pageNo]);</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    }</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keyword">delete</span> hashTable;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keyword">delete</span>[] <a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a>;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keyword">delete</span>[] bufDescTable;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab9ae3b12aac55b119b5763e3de2a4d2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9ae3b12aac55b119b5763e3de2a4d2b">&#9670;&nbsp;</a></span>allocPage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void badgerdb::BufMgr::allocPage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbadgerdb_1_1_file.html">File</a> *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> &amp;&#160;</td>
          <td class="paramname"><em>PageNo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classbadgerdb_1_1_page.html">Page</a> *&amp;&#160;</td>
          <td class="paramname"><em>page</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Allocates a new, empty page in the file and returns the <a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> object. The newly allocated page is also assigned a frame in the buffer pool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td><a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object </td></tr>
    <tr><td class="paramname">PageNo</td><td><a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> number. The number assigned to the page in the file is returned via this reference. </td></tr>
    <tr><td class="paramname">page</td><td>Reference to page pointer. The newly allocated in-memory <a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> object is returned via this reference. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="buffer_8cpp_source.html#l00168">168</a> of file <a class="el" href="buffer_8cpp_source.html">buffer.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;  {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <a class="code" href="namespacebadgerdb.html#a1e7378fbefaea050a47e6cde929e9c01">FrameId</a> frameNo;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    allocBuf(frameNo);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a>[frameNo] = file-&gt;allocatePage();</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    page = &amp;(<a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a>[frameNo]);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    pageNo = <a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a>[frameNo].<a class="code" href="classbadgerdb_1_1_page.html#af8416fd0be779f473c97b47e797e1c53">page_number</a>();</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    hashTable-&gt;<a class="code" href="classbadgerdb_1_1_buf_hash_tbl.html#a92480d460ddb07e8b04ab7f99107e334">insert</a>(file, pageNo, frameNo);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    bufDescTable[frameNo].Set(file, pageNo);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a702a264ae946b334414e51700edd81a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a702a264ae946b334414e51700edd81a0">&#9670;&nbsp;</a></span>clearBufStats()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void badgerdb::BufMgr::clearBufStats </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Clear buffer pool usage statistics </p>

<p class="definition">Definition at line <a class="el" href="buffer_8h_source.html#l00284">284</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  {</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    bufStats.<a class="code" href="structbadgerdb_1_1_buf_stats.html#a04a848e5458491fd3ea56133464cadbd">clear</a>();</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a870a80a0f0abcf3b640b913b46b64486"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a870a80a0f0abcf3b640b913b46b64486">&#9670;&nbsp;</a></span>disposePage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void badgerdb::BufMgr::disposePage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbadgerdb_1_1_file.html">File</a> *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>&#160;</td>
          <td class="paramname"><em>PageNo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Delete page from file and also from buffer pool if present. Since the page is entirely deleted from file, its unnecessary to see if the page is dirty.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td><a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object </td></tr>
    <tr><td class="paramname">PageNo</td><td><a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> number </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="buffer_8cpp_source.html#l00179">179</a> of file <a class="el" href="buffer_8cpp_source.html">buffer.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;  {</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <a class="code" href="namespacebadgerdb.html#a1e7378fbefaea050a47e6cde929e9c01">FrameId</a> frameNo;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="keywordflow">try</span></div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;      hashTable-&gt;<a class="code" href="classbadgerdb_1_1_buf_hash_tbl.html#a23b1030dd244d0d956176a596aae0210">lookup</a>(file, PageNo, frameNo);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;      bufDescTable[frameNo].Clear();</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;      hashTable-&gt;<a class="code" href="classbadgerdb_1_1_buf_hash_tbl.html#a5739cc2b22c74d62e25c9d3d316144d8">remove</a>(file, PageNo);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="keywordflow">catch</span> (HashNotFoundException &amp;e)</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    {</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    }</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    file-&gt;deletePage(PageNo);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="acc61d1985720411ebb76e70f702827d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc61d1985720411ebb76e70f702827d3">&#9670;&nbsp;</a></span>flushFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void badgerdb::BufMgr::flushFile </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classbadgerdb_1_1_file.html">File</a> *&#160;</td>
          <td class="paramname"><em>file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Writes out all dirty pages of the file to disk. All the frames assigned to the file need to be unpinned from buffer pool before this function can be successfully called. Otherwise Error returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td><a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classbadgerdb_1_1_page_pinned_exception.html" title="An exception that is thrown when a page which is not expected to be pinned in the buffer pool is foun...">PagePinnedException</a></td><td>If any page of the file is pinned in the buffer pool </td></tr>
    <tr><td class="paramname"><a class="el" href="classbadgerdb_1_1_bad_buffer_exception.html" title="An exception that is thrown when a buffer is found whose valid is false but other variables in BufDes...">BadBufferException</a></td><td>If any frame allocated to the file is found to be invalid </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="buffer_8cpp_source.html#l00146">146</a> of file <a class="el" href="buffer_8cpp_source.html">buffer.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  {</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    BufDesc *tmpbuf;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keywordflow">for</span> (std::uint32_t i = 0; i &lt; numBufs; i++)</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    {</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;      tmpbuf = &amp;(bufDescTable[i]);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;      <span class="keywordflow">if</span> (tmpbuf-&gt;file != file)</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;      <span class="keywordflow">if</span> (tmpbuf-&gt;pinCnt)</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordflow">throw</span> PagePinnedException(file-&gt;filename(), tmpbuf-&gt;pageNo, tmpbuf-&gt;frameNo);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;      <span class="keywordflow">if</span> (!tmpbuf-&gt;valid)</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordflow">throw</span> BadBufferException(tmpbuf-&gt;frameNo, tmpbuf-&gt;dirty, tmpbuf-&gt;valid, tmpbuf-&gt;refbit);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;      <span class="keywordflow">if</span> (tmpbuf-&gt;dirty)</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;      {</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        tmpbuf-&gt;file-&gt;writePage(<a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a>[i]);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        tmpbuf-&gt;dirty = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;      }</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;      hashTable-&gt;<a class="code" href="classbadgerdb_1_1_buf_hash_tbl.html#a5739cc2b22c74d62e25c9d3d316144d8">remove</a>(tmpbuf-&gt;file, tmpbuf-&gt;pageNo);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;      tmpbuf-&gt;Clear();</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    }</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a93148e1af99f06f4f264d948920b7c1c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93148e1af99f06f4f264d948920b7c1c">&#9670;&nbsp;</a></span>getBufStats()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structbadgerdb_1_1_buf_stats.html">BufStats</a>&amp; badgerdb::BufMgr::getBufStats </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get buffer pool usage statistics </p>

<p class="definition">Definition at line <a class="el" href="buffer_8h_source.html#l00276">276</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;  {</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    <span class="keywordflow">return</span> bufStats;</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a598b3112b8193af603f5bc97c478a671"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a598b3112b8193af603f5bc97c478a671">&#9670;&nbsp;</a></span>printSelf()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void badgerdb::BufMgr::printSelf </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Print member variable values. </p>

<p class="definition">Definition at line <a class="el" href="buffer_8cpp_source.html#l00194">194</a> of file <a class="el" href="buffer_8cpp_source.html">buffer.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  {</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    BufDesc *tmpbuf;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <span class="keywordtype">int</span> validFrames = 0;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="keywordflow">for</span> (std::uint32_t i = 0; i &lt; numBufs; i++)</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    {</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;      tmpbuf = &amp;(bufDescTable[i]);</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;FrameNo:&quot;</span> &lt;&lt; i &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;      tmpbuf-&gt;Print();</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160; </div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;      <span class="keywordflow">if</span> (tmpbuf-&gt;valid == <span class="keyword">true</span>)</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        validFrames++;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160; </div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    std::cout &lt;&lt; <span class="stringliteral">&quot;Total Number of Valid Frames:&quot;</span> &lt;&lt; validFrames &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a9f853f0f1d4628e7e14374d0c7c6a4f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f853f0f1d4628e7e14374d0c7c6a4f3">&#9670;&nbsp;</a></span>readPage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void badgerdb::BufMgr::readPage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbadgerdb_1_1_file.html">File</a> *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>&#160;</td>
          <td class="paramname"><em>PageNo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classbadgerdb_1_1_page.html">Page</a> *&amp;&#160;</td>
          <td class="paramname"><em>page</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reads the given page from the file into a frame and returns the pointer to page. If the requested page is already present in the buffer pool pointer to that frame is returned otherwise a new frame is allocated from the buffer pool for reading the page.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td><a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object </td></tr>
    <tr><td class="paramname">PageNo</td><td><a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> number in the file to be read </td></tr>
    <tr><td class="paramname">page</td><td>Reference to page pointer. Used to fetch the <a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> object in which requested page from file is read in. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="buffer_8cpp_source.html#l00109">109</a> of file <a class="el" href="buffer_8cpp_source.html">buffer.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  {</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <a class="code" href="namespacebadgerdb.html#a1e7378fbefaea050a47e6cde929e9c01">FrameId</a> frameNo;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordflow">try</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;      hashTable-&gt;<a class="code" href="classbadgerdb_1_1_buf_hash_tbl.html#a23b1030dd244d0d956176a596aae0210">lookup</a>(file, pageNo, frameNo);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;      bufDescTable[frameNo].refbit = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;      bufDescTable[frameNo].pinCnt++;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;      page = &amp;(<a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a>[frameNo]);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    }</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keywordflow">catch</span> (HashNotFoundException &amp;e)</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    {</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;      allocBuf(frameNo);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;      <a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a>[frameNo] = file-&gt;readPage(pageNo);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;      page = &amp;(<a class="code" href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">bufPool</a>[frameNo]);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      hashTable-&gt;<a class="code" href="classbadgerdb_1_1_buf_hash_tbl.html#a92480d460ddb07e8b04ab7f99107e334">insert</a>(file, pageNo, frameNo);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;      bufDescTable[frameNo].Set(file, pageNo);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    }</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="aa9bdf04c8543f59744db22efa9420c89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9bdf04c8543f59744db22efa9420c89">&#9670;&nbsp;</a></span>unPinPage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void badgerdb::BufMgr::unPinPage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbadgerdb_1_1_file.html">File</a> *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>&#160;</td>
          <td class="paramname"><em>PageNo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>dirty</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unpin a page from memory since it is no longer required for it to remain in memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td><a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object </td></tr>
    <tr><td class="paramname">PageNo</td><td><a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> number </td></tr>
    <tr><td class="paramname">dirty</td><td>True if the page to be unpinned needs to be marked dirty <br  />
 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classbadgerdb_1_1_page_not_pinned_exception.html" title="An exception that is thrown when a page which is expected to be pinned in the buffer pool is found to...">PageNotPinnedException</a></td><td>If the page is not already pinned </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="buffer_8cpp_source.html#l00129">129</a> of file <a class="el" href="buffer_8cpp_source.html">buffer.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  {</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <a class="code" href="namespacebadgerdb.html#a1e7378fbefaea050a47e6cde929e9c01">FrameId</a> frameNo;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordflow">try</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;      hashTable-&gt;<a class="code" href="classbadgerdb_1_1_buf_hash_tbl.html#a23b1030dd244d0d956176a596aae0210">lookup</a>(file, pageNo, frameNo);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;      <span class="keywordflow">if</span> (!bufDescTable[frameNo].pinCnt)</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <span class="keywordflow">throw</span> PageNotPinnedException(bufDescTable[frameNo].file-&gt;filename(), bufDescTable[frameNo].pageNo, frameNo);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;      bufDescTable[frameNo].pinCnt--;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;      <span class="keywordflow">if</span> (dirty)</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        bufDescTable[frameNo].dirty = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keywordflow">catch</span> (HashNotFoundException &amp;e)</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    {</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    }</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa498047fc351652d0bc7eabf6cb62ab0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa498047fc351652d0bc7eabf6cb62ab0">&#9670;&nbsp;</a></span>bufPool</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_page.html">Page</a>* badgerdb::BufMgr::bufPool</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Actual buffer pool from which frames are allocated </p>

<p class="definition">Definition at line <a class="el" href="buffer_8h_source.html#l00205">205</a> of file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/ubuntu/study/dbmslab/lab2/BufMgr/src/<a class="el" href="buffer_8h_source.html">buffer.h</a></li>
<li>/home/ubuntu/study/dbmslab/lab2/BufMgr/src/<a class="el" href="buffer_8cpp_source.html">buffer.cpp</a></li>
</ul>
</div><!-- contents -->
<div class="ttc" id="aclassbadgerdb_1_1_buf_mgr_html_aa498047fc351652d0bc7eabf6cb62ab0"><div class="ttname"><a href="classbadgerdb_1_1_buf_mgr.html#aa498047fc351652d0bc7eabf6cb62ab0">badgerdb::BufMgr::bufPool</a></div><div class="ttdeci">Page * bufPool</div><div class="ttdef"><b>Definition:</b> <a href="buffer_8h_source.html#l00205">buffer.h:205</a></div></div>
<div class="ttc" id="anamespacebadgerdb_html_a1e7378fbefaea050a47e6cde929e9c01"><div class="ttname"><a href="namespacebadgerdb.html#a1e7378fbefaea050a47e6cde929e9c01">badgerdb::FrameId</a></div><div class="ttdeci">std::uint32_t FrameId</div><div class="ttdoc">Identifier for a frame in buffer pool.</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00025">types.h:25</a></div></div>
<div class="ttc" id="aclassbadgerdb_1_1_page_html_af8416fd0be779f473c97b47e797e1c53"><div class="ttname"><a href="classbadgerdb_1_1_page.html#af8416fd0be779f473c97b47e797e1c53">badgerdb::Page::page_number</a></div><div class="ttdeci">PageId page_number() const</div><div class="ttdef"><b>Definition:</b> <a href="page_8h_source.html#l00193">page.h:193</a></div></div>
<div class="ttc" id="aclassbadgerdb_1_1_buf_hash_tbl_html_a5739cc2b22c74d62e25c9d3d316144d8"><div class="ttname"><a href="classbadgerdb_1_1_buf_hash_tbl.html#a5739cc2b22c74d62e25c9d3d316144d8">badgerdb::BufHashTbl::remove</a></div><div class="ttdeci">void remove(const File *file, const PageId pageNo)</div><div class="ttdef"><b>Definition:</b> <a href="buf_hash_tbl_8cpp_source.html#l00086">bufHashTbl.cpp:86</a></div></div>
<div class="ttc" id="aclassbadgerdb_1_1_buf_hash_tbl_html_a92480d460ddb07e8b04ab7f99107e334"><div class="ttname"><a href="classbadgerdb_1_1_buf_hash_tbl.html#a92480d460ddb07e8b04ab7f99107e334">badgerdb::BufHashTbl::insert</a></div><div class="ttdeci">void insert(const File *file, const PageId pageNo, const FrameId frameNo)</div><div class="ttdef"><b>Definition:</b> <a href="buf_hash_tbl_8cpp_source.html#l00048">bufHashTbl.cpp:48</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_buf_stats_html_a04a848e5458491fd3ea56133464cadbd"><div class="ttname"><a href="structbadgerdb_1_1_buf_stats.html#a04a848e5458491fd3ea56133464cadbd">badgerdb::BufStats::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> <a href="buffer_8h_source.html#l00142">buffer.h:142</a></div></div>
<div class="ttc" id="aclassbadgerdb_1_1_buf_hash_tbl_html_a23b1030dd244d0d956176a596aae0210"><div class="ttname"><a href="classbadgerdb_1_1_buf_hash_tbl.html#a23b1030dd244d0d956176a596aae0210">badgerdb::BufHashTbl::lookup</a></div><div class="ttdeci">void lookup(const File *file, const PageId pageNo, FrameId &amp;frameNo)</div><div class="ttdef"><b>Definition:</b> <a href="buf_hash_tbl_8cpp_source.html#l00070">bufHashTbl.cpp:70</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
